function [code, err] = TLDlgDlg(code, object)
% TL_DLG_ERROR_MSG gets error code and message
%
% SYNTAX [code, err] = TLDlgDlg(code, object)
%   gets error code and message
%
%   INPUT ARGUMENTS
%   code        error number
%   object      erroneous object
%
%   OUTPUT ARGUMENTS
%   code        error number
%   err         error message 


% Author(s): R. Grotmaack
% $Revision: 1.2 $
% $Date: 2007/08/13 16:54:17MESZ $
% $ProjectName: e:


switch code
    case 120
       err = ['Data inconsistent: select a valid ' , object];
    % dsdd isCompatible error codes
    case 197
       err = ['Data inconsistent: specified ', object, ' object does not exist'];
    case 198
       err = ['Data inconsistent: ', object, ' object is not a ', object, ' object'];
    case 199
    % object selection error codes: from 200 to 300    
       err = ['Data inconsistent: read access of ', object, 'object is missing (???)'];
    case 201
       err = 'Data inconsistent: variable classes with const property cannot be selected';
    case 500
    % error codes for name macros
       err = ['Data inconsistent: Name not correct. Possible name is ', object];
    otherwise
       err = 'Data inconsistent: other error';
end
